import tkinter as tk

root = tk.Tk()
root.title("Tkinter 示例")
root.geometry("400x300")
text = tk.Text(root,width=30,height=10)
text.pack()
root.mainloop()